<div>    
    <h3>Quản lý chuyên mục</h3> <b>
        <p><a href="<?php echo URL_BASE ?>/admin/category/getCreate">Thêm chuyên mục</a></p>
    </b>
    <table border="1">
        <thead>
            <tr>
                <th>ID</th>
                <th>Tên chuyên mục</th>
                <th>Chức năng</th>
            </tr>
        </thead>
        <?php
        //print_r($this->categories);
        foreach ($this->categories as $key => $cat) {
            ?>      
            <tr>

                <td> <strong><?php echo $cat->getId(); ?></strong> </td>
                <td> <strong><?php echo $cat->getName(); ?></strong> </td>
                <td><a href="<?php echo URL_BASE ?>/admin/category/getEdit?id=<?php echo $cat->getId(); ?>">Sửa</a>
                    | <a href="<?php echo URL_BASE ?>/admin/category/postDelete?id=<?php echo $cat->getId(); ?>" onclick="return confirm('Bạn có muốn xóa chuyên mục này?');">Xóa</a>
                </td>
            </tr>
            <?php
        }
        ?>      
    </table>
</div><br/><br/>
